<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model yak\layui\search\AdminSearch */
/* @var $form yii\widgets\ActiveForm */

?>

<div class="admin-search">

    <?php $form = ActiveForm::begin([
        'action' => ['index'],
        'method' => 'get',
        'fieldClass' => 'yak\layui\widgets\form\SearchActiveField',
        'options' => [
            'class' => 'layui-form layui-form-pane yak-form-search',
            'lay-filter' => 'admin-search'
        ],
        'enableClientScript' => false
    ]); ?>

    <div class="layui-form-group layui-form-item">

        <?php //  $form->field($model, 'id') ?>

        <?= \yak\layui\widgets\search\DropDownSearch::widget([
            'model' => $model, 'items' => ['username', 'id', 'name']
        ]) ?>

        <?php // $form->field($model, 'auth_key') ?>

        <?php // echo $form->field($model, 'password_hash') ?>

        <?php // echo $form->field($model, 'password_reset_token') ?>

        <?php // echo $form->field($model, 'email') ?>

        <?php echo $form->field($model, 'status')
            ->dropDownList($model->statusLabels(), [
                'prompt' => '--状态--', 'lay-search' => true
            ]) ?>

        <?php echo $form->field($model, 'type')
            ->dropDownList($model->typeLabels(), [
                'prompt' => '--类型--', 'lay-search' => true
            ]) ?>

        <?php // echo $form->field($model, 'created_at') ?>

        <?php // echo $form->field($model, 'updated_at') ?>


        <div class="layui-inline">
            <?= Html::submitButton('查询', [
                'class' => 'layui-btn layui-btn-normal yak-search-btn', 'lay-submit' => true
            ]) ?>
        </div>

    </div>

    <?php ActiveForm::end(); ?>

</div>
